package stool.flyweight;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/16
 */
public class Main {

    public static void main(String[] args) {


        WebSiteFactory factory = new WebSiteFactory();

        WebSite a = factory.findWebSiteCategory("a");
        a.use(new User("aa"));

        WebSite b = factory.findWebSiteCategory("a");
        b.use(new User("bb"));

        WebSite c = factory.findWebSiteCategory("b");
        c.use(new User("cc"));

        WebSite d = factory.findWebSiteCategory("b");
        d.use(new User("dd"));

        System.out.println(factory.findWebSiteCount());


    }
}
